package api

import (
	. "web_framework/router/api/v1"

	log "github.com/sirupsen/logrus"
)

type API interface {
	Name() string
	Bind()
}

var apiList = []API{
	PingAPI{},
	UserAPI{},
	TaskAPI{},
	TrackerAPI{},
	CommentAPI{},
	ResourceAPI{},
	DeviceAPI{},
	StorageAPI{},
}

func BindAPIs() {
	for i, api := range apiList {
		log.WithField("id", i).WithField("name", api.Name()).Info("Bind API")
		api.Bind()
	}
}
